package com.taptech.doufu.ui.adapter;



import com.taptech.doufu.ui.fragment.ScrollAbleFragment;

import java.util.List;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

/**
 * Created by Administrator on 2016/1/23.
 */
public class ScrollAbleViewPagerAdapter extends FragmentPagerAdapter
{

    private List<ScrollAbleFragment> mFragments ;


    public ScrollAbleViewPagerAdapter(FragmentManager fm, List<ScrollAbleFragment> fragments)
    {
        super(fm);
        mFragments = fragments;
    }


    @Override
    public Fragment getItem(int arg0)
    {
        // TODO Auto-generated method stub
        return mFragments.get(arg0);
    }

    @Override
    public int getCount()
    {
        // TODO Auto-generated method stub
        if (mFragments != null)
        {
            return mFragments.size();
        }
        return 0;
    }
}
